/*
 * Point3D.h
 *
 *  Created on: Jan 22, 2011
 *      Author: user
 */

#ifndef COORDINATEMATH_H_
#define COORDINATEMATH_H_


float normalizeAngle(float);
float r(float);
float d(float);
class Vector;

class OrderedTriple{
public:
	OrderedTriple();
	~OrderedTriple();
	void translateInPlace(float,float,float);
	void translateInPlace(Vector&);
	float getX();
	float getY();
	float getZ();


protected:
	float x,y,z;
};



class Point3D: public OrderedTriple{
public:
	Point3D();
	Point3D(float,float,float);
	~Point3D();
	void moveTo(Point3D&);
	void moveTo(float,float,float);
	float distanceTo(Point3D&);
};



class Vector: public OrderedTriple{
public:
	enum coordinateType{
		kOrthogonalCoordinates,
		kCylindricalCoordinates,
		kSphericalCoordinates
	};
	Vector();
	Vector(coordinateType,float,float,float);

	Vector(Point3D&, Point3D&);
	~Vector();
	
	float getR(coordinateType);
	float getTheta();
	float getPhi();
};

#endif /* COORDINATEMATH_H_ */
